<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/html"
      lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
   <span th:each="user,iterstrt:${list}">
       <span th:text="${user.id}"></span></br>
       <span th:text="${user.name}"></span></br>
       <span th:text="${user.age}"></span></br>
       <span th:text="${iterstrt.index}"></span>
   </span>
</body>
</html>